Systems and Methods for Encoding and Playing Back Video at Different Frame Rates Using Enhancement Layers

ABSTRACT

Systems and methods in accordance with embodiments of this invention provide for encoding and playing back video at different frame rates using enhancement layers. In a number of embodiments, video is encoded using temporal scalability involving the creation of a base layer at a first frame rate and an enhancement layer including additional frames enabling playback at a second higher frame rate. The second higher frame rate can also be referred to as an enhanced frame rate. In a number of embodiments, the base and enhancement layers are stored in one or more container files that contain metadata describing the enhancement layer. Based on the capabilities of a playback device, it can select the particular frame rate at which to playback encoded video.

RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 15/863,456 entitled “Systems and Methods for Encoding and Playing Back Video at Different Frame Rates Using Enhancement Layers” to van der Schaar et al., filed Jan. 5, 2018, which is a continuation of U.S. application Ser. No. 14/679,469 entitled “Systems and Methods for Encoding and Playing Back Video at Different Frame Rates Using Enhancement Layers” to van der Schaar et al., filed Apr. 6, 2015, which claims priority to U.S. patent application Ser. No. 61/975,789 entitled “Systems and Methods for Encoding and Playing Back Video at Different Frame Rates Using Enhancement Layers” to van der Schaar et al., filed Apr. 5, 2014, the disclosures of which are incorporated herein by reference in their entireties.

FIELD OF THE INVENTION

The present invention generally relates to encoding and playback of video content and more specifically to the use of metadata to enable playback of media at different frame rates.

BACKGROUND OF THE INVENTION

Media distributed by content providers to content consumers can be encoded using a variety of video compression standards that facilitate the distribution of the content across a distribution channel. Well know compression standards include H.264/MPEG-4, published by the ITU-T Video Coding Experts Group (VCEG) together with the ISO/IEC JTC1 Moving Picture Experts Group (MPEG), and the newer High Efficiency Video Coding (HEVC) standard, MPEG-H Part 2, developed by MPEG and VCEG, both of which are herein incorporated by reference. Video compression or video encoding involves compressing the amount of information used to describe the frames of video in a video sequence in order to reduce the consumption of network resources that are utilized when distributing content via a network. The reduced size also facilitates the distribution of content on non-volatile storage mediums such as CD-ROMs and flash-drives.

Media playback devices can utilize video decoders to decode encoded video for playback. Video can be encoded using predetermined encoding profiles. Typically, playback devices utilize decoders that are capable of playing back video encoded using one or more profiles. A particular profile may specify parameters and limits for various video settings, including picture resolution (e.g., 720p, 1080p, 4 k etc.), frame rate (i.e., 24, 30, 48, 60 frames per second, etc.), and bitrate (e.g., 12 Mbps, 40 Mbps, etc.).

Encoded media is typically stored in one or more container files. The most commonly used media container formats are the MP4 container format specified in MPEG-4 Part 14 (i.e., ISO/IEC Standard 14496-14) and the MPEG transport stream (TS) container specified in MPEG-2 Part 1 (i.e., ISO/IEC Standard 13818-1). The Matroska container is a media container developed as an open standard project by the Matroska non-profit organization of Aussonne, France. The Matroska container is based upon Extensible Binary Markup Language (EBML), which is a binary derivative of the Extensible Markup Language (XML). Decoding of the Matroska container is supported by many consumer electronics (CE) devices. The DivX Plus file format developed by DivX, LLC of San Diego, Calif. utilizes an extension of the Matroska container format (i.e., is based upon the Matroska container format, but includes elements that are not specified within the Matroska format).

Furthermore, encoded video can be distributed to devices through different mechanisms, including downloading from a server for storage and future playback on the device, streaming the encoded video during playback on the device, and retrieving the encoded video from one or more files stored on a CD-ROM, flash drive, or other non-volatile storage medium, and various other storage and distribution mechanisms. Streaming solutions typically utilize either Hypertext Transfer Protocol (HTTP), published by the Internet Engineering Task Force and the World Wide Web Consortium as RFC 2615, or Real Time Streaming Protocol (RTSP), published by the Internet Engineering Task Force as RFC 2326, to stream media between a server and a playback device. HTTP is a stateless protocol that enables a playback device to request a byte range within a file. HTTP is described as stateless, because the server is not required to record information concerning the state of the playback device requesting information or the byte ranges requested by the playback device in order to respond to requests received from the playback device. RTSP is a network control protocol used to control streaming media servers. Playback devices issue control commands, such as “play” and “pause”, to the server streaming the media to control the playback of media files. When RTSP is utilized, the media server records the state of each client device and determines the media to stream based upon the instructions received from the client devices and the client's state. Thus, content providers utilize different distribution protocols for each of the different mechanisms (i.e., download vs. streaming) for distributing video files to different devices.

SUMMARY OF THE INVENTION

Systems and methods in accordance with embodiments of this invention encode and play back video at different frame rates using enhancement layers. In an embodiment of the invention, a non-transitory machine readable medium containing processor instructions, where execution of the instructions by a processor causes the processor to perform a process that includes receiving video having several access units and encoding the video into a set of layers that includes a base layer and at least one enhancement layer, where the encoding includes: (i) using a temporal identifier of each access unit to determine the particular layer associated with the access unit and (ii) retaining an order of the temporal identifiers of the several access units of the video.

In another embodiment, the temporal identifier of an access unit is stored in an initial set of bits of the access unit.

In yet another embodiment, a process inserts a temporal identifier for a set of access units of the several access units of the video.

In still another embodiment, a process inserts a metadata tag providing information regarding the layers available and the frame rate of each layer.

In still yet another embodiment, a process receives a request for streaming of the video, determines playback capabilities of a device requesting the video, and streams different sets of layers of the video based on the playback capabilities of the device, where (i) the base layer is streamed to a playback device capable of playing back the base layer and (ii) the base layer and at least one enhancement layer is streamed to a playback device capable of streaming the plurality of layers.

In a further embodiment, streaming the different sets of layers includes merging the different layers using the retained order of the temporal identifiers of the plurality of access units of the video.

In another embodiment, a process receives a request for downloading of the video from a playback device and provides the encoded video to the playback device.

In another embodiment again, a frame rate of at least one enhancement layer is an integer multiple of the base layer.

In yet another embodiment again, a process stores each layer as a separate stream.

In still yet another embodiment again, a process stores each layer in a separate container file.

In an embodiment of the invention provides a source encoder that includes a processor configured by a source encoder application to receive video having several access units and encode the video into a set of layers that includes a base layer and at least one enhancement layer, where the encoding includes: (i) using a temporal identifier of each access unit to determine the particular layer associated with the access unit and (ii) retaining an order of the temporal identifiers of the plurality of access units of the video;

In another embodiment, a temporal identifier of an access unit is stored in a header of the access unit.

In yet another embodiment, a source encoder inserts a temporal identifier for a set of access units of the several access units of the video.

In still a further embodiment, a source encoder inserts a metadata tag providing information regarding the layers available and the frame rate of each layer.

An embodiment of the invention includes a playback device configured to playback video that includes a processor configured to communicate with a memory, where the memory contains a client application, where the client application configures the processor to receive video that includes several access units, playback the video, where the playback device plays back the video (i) using a base layer when the playback device has a first set of playback capabilities and (ii) using the base layer and at least one enhancement layer when the playback device has a second set of playback capabilities.

In another embodiment, a client application further configures the processor to identify an order of temporal identifiers of the several access units of the video and merge the access units of the base layer and the access units of at least one enhancement layer using the order of temporal identifies of the several access units of the video.

In yet another embodiment, a client application further configures the processor to request streaming of the video to a playback server and provide information regarding playback capabilities of the playback device to the playback server and receive a first stream that includes the base layer of the video and a second stream that includes the at least one enhancement layer of the video.

In still yet another embodiment, a client application further configures the processor to request downloading of the video to a content distribution server and provide playback capabilities of the playback device to the content distribution server, receive the video from the content distribution server, where a first device receives video that includes the base layer when the first device is capable of playing back the video at a first frame rate and a second device receives video that includes the base layer and at least one enhancement layer when the second device is capable of playing back the video at a second frame rate.

In yet another embodiment again, a client application further configures the processor to retrieve a metadata tag from the video identifying the layers available and the frame rate of each layer; and determine a set of layers to playback based on the information in the metadata tag.

In a further embodiment again, a client application further configures the processor to identify the temporal identifier of an access unit by parsing an initial set of bytes of the access unit.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a network diagram of a system for encoding and playing back video at different frame rates using enhancement layers in accordance with an embodiment of the invention.

FIG. 2 conceptually illustrates a basic architecture of a playback device in accordance with an embodiment of the invention.

FIG. 3 conceptually illustrates streams for streaming to playback devices in accordance with embodiments of the invention.

FIG. 4A conceptually illustrates a Matroska container file used to store encoded video in accordance with an embodiment of the invention.

FIG. 4B conceptually illustrates a metadata tag contained within a container file that includes video encoded with temporal scalability in accordance with an embodiment of the invention.

FIG. 5A conceptually illustrates a Clusters element of a Matroska container file containing encoded video in accordance with an embodiment of the invention.

FIG. 5B conceptually illustrates a Cluster element for use in the playback of encoded video with temporal scalability.

FIG. 6 conceptually illustrates an example of separate container files storing different temporal layers in accordance with an embodiment of the invention.

FIG. 7 is a flow chart illustrating a process for embedding information describing video encoded with temporal scalability in a container file in accordance with an embodiment of the invention.

FIG. 8 is a flow chart illustrating a process for playing back encoded video including temporal layers in accordance with an embodiment of the invention.

FIG. 9 is a flow chart illustrating a process for streaming different layers of encoded video using separate streams in accordance with an embodiment of the invention.

FIG. 10 is a flow chart illustrating a process for merging separate streams of an encoded video in accordance with an embodiment of the invention.

FIG. 11A conceptually illustrates the reference dependencies that may exist between a set of video frames in accordance with an embodiment of the invention.

FIG. 11B conceptually illustrates a table providing a decode order for frames of an encoded video in accordance with an embodiment of the invention.

FIG. 12A conceptually illustrates a portion of an encoded video stream containing several frames in accordance with embodiments of the invention.

FIG. 12B conceptually illustrates separate streams generated for encoded video in accordance with embodiments of the invention.

FIG. 13 conceptually illustrates merging of different temporal streams in accordance with embodiments of the invention.

FIG. 14 illustrates streaming different temporal layers of an encoded video for playback in accordance with embodiments of the invention.

DETAILED DISCLOSURE OF THE INVENTION

Turning now to the drawings, systems and methods for encoding and playing back video at different frame rates using enhancement layers in accordance with embodiments of the invention are illustrated. In a number of embodiments, video is encoded using temporal scalability involving the creation of a base layer at a first frame rate and an enhancement layer including additional frames enabling playback at a second higher frame rate. The second higher frame rate can also be referred to as an enhanced frame rate. In a number of embodiments, the base and enhancement layers are stored in one or more container files that contain metadata describing the enhancement layer. Based on the capabilities of a playback device, it can select the particular frame rate at which to playback encoded video. For example, for a single media file containing video encoded with temporal scalability that provides both a base frame rate (e.g., 30 fps) and an enhanced frame rate (e.g., 60 fps), a first device may only be able to play back the encoded video at the base frame rate while a different device may be able to playback encoded video at the enhanced frame rate. Thus, video content can be played back at different frame rates on different devices.

In several embodiments, encoded video can be distributed to playback devices using a variety of distribution mechanisms, including downloading of one or more files containing the encoded video or streaming the encoded video to the playback device for progressive playback and/or as part of an adaptive bitrate streaming system. However, in order to avoid wasting network resources when streaming encoded video that includes temporal scalability to a device that is not capable of handling the decoding of the enhancement layer(s), in some embodiments the different video layers are separated and streamed on an “as needed” basis to the playback device. For example, for a file containing encoded video that has both a base video layer that provides a base frame rate of 30 fps and an enhancement layer that provides a frame rate of 60 fps, a first device with only the capacity to playback video at a frame rate of 30 fps can request a stream of only the base layer of the encoded video while a second device that has the capacity to playback the video at a frame rate of 60 fps can request streams containing both the base video layer and the enhancement layer.

When streaming multiple separate video layers to a user's device, the streams can be combined at the playback device into a single stream in order to allow for the playback of the encoded video on the device at the enhanced frame rate. Due to dependencies that can exist between encoded frames of video (specifically bi-directionally encoded frames of video), the frames of video in the base layer and/or the enhancement layer may not be received by the playback device in the order in which they are to be played back. In several embodiments, the frames of video in the base and/or enhancement layers are received in “decode order”, which is an order that causes the decoder to have fully decoded all frames on which a given frame depends prior to decoding the given frame. In order to determine the particular decode order, in some embodiments, one or more of the enhancement layers include metadata that specifies a sequential order for selecting frames of video from the different layers to merge the frames into a single stream for decoding and playback at the enhanced frame rate.

Some embodiments utilize an adaptive streaming mechanism that detects the present streaming conditions (e.g., the user's network bandwidth and CPU capacity) in real time and adjusts the frame rate of the streamed video accordingly. When a playback device has the capability to play back the video file at an enhanced frame rate, the playback device can stream both the base and enhancement layers when the network bandwidth is sufficient to satisfy that bitrate necessary for transmission and/or the CPU has capacity to process the encoded video at the enhanced rate. The playback device may likewise stream the encoded video at the base rate when a change in the streaming conditions is detected indicative of insufficient bandwidth for the enhanced frame rate and/or the CPU no longer has capacity to process the encoded video at the enhanced frame rate.

In several embodiments, the base layer includes a sequence of frames encoded at a first frame rate in such a way that the frames in the base layer are only dependent upon other frames in the base layer. In a number of embodiments, the enhancement layer includes additional frames that, when merged with the sequence of frames in the base layer, form a sequence of frames encoded at a second frame rate. In certain embodiments, the frames in the enhancement layer are encoded so that they are only dependent upon frames in the base layer. In a number of embodiments, the frames in the enhancement layer are further constrained so that the enhancement layer does not include any I-frames (i.e., frames that can be decoded without reference to other frames). In other embodiments, the enhancement layer can include frames that incorporate dependencies upon other frames in the enhancement layer and/or I-frames.

In some embodiments, the source video is encoded and decoded using codecs implemented in accordance with the HEVC standard. In order to signal the availability of temporal scalability (i.e., the existence of at least one enhancement layer), the files containing the encoded video can include a metadata tag that provides information regarding the available layers within the media file and the frame rate of each layer. In several embodiments, at least one enhancement layer includes metadata in the form of an ordered set of Access Unit Delimiters (AUDs) that specify a sequential order for selecting access units from different layers. In particular, each AUD identifies the specific layer containing the video data of the Access Unit and this information can be used to determine the manner in which the Access Units from the different layers are combined into a single video stream. In some embodiments, the multiple streams are combined on the user's playback device prior to being provided to the decoder on the device. In other embodiments, the separate streams are combined into a single stream by the content provider prior to their streaming to the user's device.

System and methods for encoding and playing back video at different frame rates using enhancement layers in accordance with embodiments of the invention are discussed further below.

System Architecture for Encoding and Playing Back Video at Different Frame Rates Using Enhancement Layers

A system for encoding and playing back video at different frame rates using enhancement layers in accordance with an embodiment of the invention is illustrated in FIG. 1. The system 100 includes a source encoder 102 configured to encode source media into encoded video. In many embodiments, the source encoder encodes the video using temporal scalability, which allows the encoded video to be played back at different frame rates. In the illustrated embodiment, the source encoder is a server. In other embodiments, the source encoder can be any processing device including a processor and sufficient resources to perform the transcoding of source media including (but not limited to) video, audio, and/or subtitles.

As is discussed further below, in many embodiments, the source encoder is able to encode a video with temporal scalability by creating a base layer of video frames that allow playback at a base frame rate and one or more enhancement layers of video frames that allow playback at a higher enhanced frame rate. In many embodiments, the source encoder stores the encoded video in one or more container files. In some embodiments, the encoded video is then uploaded to distribution server 104. In many embodiments, source encoder uploads the encoded video as a single file containing multiple temporal layers. In several embodiments, the encoded video is uploaded as one or more separate streams, with each stream corresponding to a particular temporal layer of the encoded video. In many embodiments, each stream can be stored in a separate container file (e.g., Matroska container file) while in other embodiments the streams are stored in the same container file. A device 105-107 may then request either to (i) download the entire file, or (ii) receive a streamed video for progressive playback. In some embodiments, the streamed video provides either the base layer of video data when the requested stream is at the base frame rate or the base layer and one or more enhancement layers when the requested stream is at a higher enhanced frame rate.

In many embodiments, the encoded video is stored in Matroska container files. As is discussed further below, the encoded video can be stored within the Matroska container file in a way that facilitates the embedding of metadata within a file containing encoded video that describes any enhancement layers that may be available to achieve playback of the content at an enhanced frame rate. In many embodiments, the Matroska container files are specialized Matroska container files that include enhancements (i.e., elements that do not form part of the Matroska file format specification) that facilitate the retrieval of the video at different frame rates via HTTP or RTSP during the streaming of the video. The enhancements to the Matroska container file can also include storing metadata that provides information regarding the temporal layers that are available for the encoded video and the frame rate of each layer.

In many embodiments, the distribution server receives and processes download requests from a variety of playback devices 105-107 that seek to download the encoded video. When the distribution server receives a download request from a playback device, it can provide the playback device with the encoded video for storage. A downloaded video file may include a header that contains metadata describing temporal layers within the video file and the video data stored within the various temporal layers. In some embodiments, the temporal layers provided to a playback device may include only the base layer when the device requests the encoded video at the base frame rate or both the base layer and one or more enhancement layers when the device requests the encoded video at the enhanced frame rate.

In some embodiments, the distribution server receives stream requests from a variety of playback devices and subsequently streams the encoded video to the playback devices for progressive playback and/or as part of an adaptive bitrate streaming system. In several embodiments, the variety of playback devices can use HTTP or another appropriate stateless protocol to request streams via a network 108 such as the Internet. In several embodiments, a variety of playback devices can use RTSP whereby the distribution server records the state of each playback device and determines the video to stream based upon instructions received from the playback devices and stored data describing the state of the playback device.

Playback devices with different playback capacities may request different streams from the distribution server. For example, for a particular video that has been encoded with temporal scalability, a device with only the capacity to playback the encoded video at a base frame rate can request a stream from the distribution server that contains only the base layer. The distribution server would then stream only the base layer of the encoded video to the playback device. Likewise, a device with the capacity to playback video at the enhanced frame rate can request the distribution server to provide streams that contain both the base layer and the one or more enhancement layers whereby the distribution server would stream both layers to the playback device. By allowing a device to request only the particular layers that the device is capable of decoding, the system is able to avoid wasting network resources that would otherwise be needed to provide all layers to every device, including those without the capacity to handle the enhancement layers.

As described above, in order to enable playback of the video, the separate streams can be merged according to the decode order of the video frames. Thus, in many embodiments, when a device requests a stream at the enhanced frame rate, the distribution server first merges the separate temporal streams and sends a single ordered stream of video to the device. In other embodiments, the playback device is responsible for merging the separate streams into the single ordered stream prior to providing the stream to a decoder on the playback device for play back of the video stream.

In the illustrated embodiment, playback devices include personal computers 105-106 and mobile phones 107. In other embodiments, playback devices can include consumer electronics devices such as DVD players, Blu-ray players, televisions, set top boxes, video game consoles, tablets, and other devices that are capable of connecting to a server via HTTP and playing back encoded video. Although a specific architecture is shown in FIG. 1 any of a variety of architectures can be utilized that enable playback devices to request video at different frame rates as appropriate to the requirements of specific applications in accordance with embodiments of the invention.

The basic architecture of a playback device in accordance with an embodiment of the invention is illustrated in FIG. 2. The playback device 200 includes a processor 210 in communication with non-volatile memory 230, volatile memory 220, and a network interface 240. In the illustrated embodiment, the non-volatile memory includes a video decoder 232 that configures the processor to decode video and a client application 234 configured to buffer streamed video and deliver the streamed video to the video decoder 232. In several embodiments, the network interface 240 may be in communication with the processor 210, the volatile memory 220, and/or the non-volatile memory 230. Although a specific playback device architecture is illustrated in FIG. 2, any of a variety of architectures including architectures where the video decoder is located on disk or some other form of storage and is loaded into volatile memory at runtime can be utilized to implement playback devices in accordance with embodiments of the invention.

Stream Selection of Video Encoded with Temporal Scalability

As described above, different classes of devices may request different streams from the distribution server in order to play back a video at different frame rates. Streams generated by a source encoder and/or stored on a distribution server for streaming to playback devices in accordance with embodiments of the invention are illustrated in FIG. 3. The files utilized in the streaming of the source video include a top-level index file 310 and a plurality of container files 320-330 that each contain a different stream, each stream corresponding to a particular temporal layer of the encoded video. In several embodiments, the top level index file describes the content of each of the container files. In a number of embodiments, the plurality of container files includes files containing additional streams encoded at different resolutions, pixel aspect ratios, and/or maximum bitrates and the top level provides information that can be utilized to perform adaptive bitrate streaming of the content contained within the container files. As is discussed further below, the container files can take a variety of forms including (but not limited to) a Matroska (MKV) container file and/or a modified or specialized version of a Matroska container file.

In many embodiments, each Matroska container file contains a single stream that corresponds to a particular temporal layer of the encoded video. For example, a first stream could contain video frames for a base layer of the encoded video and a second stream could contain the video frames for one or more enhancement layers. In some embodiments, each stream includes only the video data for the particular layer. Thus, in many embodiments, in order to play back the video at an enhanced rate, the video data from the different layers can be combined into a single stream prior to being sent to the decoder. As can readily be appreciated, the combination of streams can occur at the server and/or at the playback device. In several embodiments, at least one enhancement layer includes metadata in the form of an ordered set of Access Unit Delimiters (AUDs) that provide the order for selecting access units from different layers (or streams). In particular, each AUD identifies the particular layer containing the video data of the Access Unit and this information can be used to determine the manner in which the Access Units from the different layers are combined into a single video stream.

As is discussed further below, in many embodiments the Matroska container files are specialized files. The encoding of the video and the manner in which the video is stored within elements within the Matroska container file can be subject to constraints designed to enhance the performance of a streaming system for playing video encoded with temporal sub-layers. In addition, the Matroska container file can include index elements that facilitate the location and downloading of frames of video (i.e., Access Units) from the various Matroska container files during the streaming of the media. Specialized Matroska container files that can be used in adaptive bitrate streaming systems are proposed by DivX, LLC in U.S. patent application Ser. No. 13/221,682, entitled “Systems and Methods for Adaptive Bitrate Streaming of Media Stored in Matroska Container Files Using Hypertext Transfer Protocol”, filed Aug. 30, 2011, the disclosure of which is hereby incorporated by reference in its entirety. Matroska container files that can be used in streaming systems that distribute video encoded with temporal layers in accordance with embodiments of the invention are discussed below.

Storing Encoded Video with Temporal Layers in Matroska Files

A Matroska container file used to store encoded video in accordance with an embodiment of the invention is illustrated in FIG. 4A. The container file 410 is an Extensible Binary Markup Language (EBML) file that is an extension of the Matroska container file format. The specialized Matroska container file 410 includes a standard EBML element 411, and a standard Segment element 412 that includes a standard Seek Head element 413, a standard Segment Information element 414, and a standard Tracks element 415. These standard elements describe the video contained within the Matroska container file. The Segment element 412 also includes a standard Clusters element 416. As is described below, the manner in which encoded video is inserted within individual Cluster elements 417-419 within the Clusters element 416 is constrained to improve the playback of the media in a streaming system. In many embodiments, the constraints imposed upon the encoded video are consistent with the specification of the Matroska container file format and involve encoding the video so that each cluster includes at least one closed GOP commencing with an IDR or “I” frame. The Clusters element 416 includes a plurality of Cluster elements 417-419 that each contains a discrete portion of encoded video. In the illustrated embodiment, each Cluster element 417-419 includes two seconds of encoded video. In other embodiments, the Cluster elements include encoded video having a greater or lesser duration than two seconds. In several embodiments, the encoded video sequences in the Cluster elements have different durations.

In addition to the above standard elements, the Segment element 412 also includes a modified version of the standard Tracks element 415. As is discussed further below, the Tracks element includes a standard Codec Private element 420. The Codec Private element includes a specialized Profile Message element 421 (e.g., the DivX™ HEVC Profile Tag specified by DivX, LLC of San Diego, Calif.) that is used to (i) signal the availability of temporal scalability for the encoded video and (ii) provide information regarding the temporal layers that are available and corresponding frame rates of each available layer. In some embodiments, the temporal scalability of encoded video can be quickly detected based on the presence of this tag within the container file and/or the presence of similar information within a top level index file.

FIG. 4B illustrates an embodiment of a Profile Message element 421 contained within an enhanced Matroska container file that contains video encoded with temporal scalability. The UUID element 422 is an identifying 128-bit self-generated universally unique identifier. The UUID can be used for multiple purposes, from tagging objects with an extremely short lifetime, to reliably identifying very persistent objects across a network. The UUID may be optionally registered as an Object Identifier Repository (OID) with the International Telecommunication Union (ITU), with headquarters in Geneva, Switzerland. The Code element 423 is an identifier identifying the entity associated with the particular codec used to encode the video. For example, when the codec is a DivX HEVC codec provided by DivX, LLC, the Code element 423 can be a bit sequence spelling “DivX HEVC” when read as a sequence of unsigned characters. The Message Type element 424 is a message format indicator. For example, if the Message Type is “0x20” then the Profile Message 421 is in a text format. In some embodiments, the type zero is prohibited and several type values may be reserved. In other embodiments, any Message Type element can be utilized as appropriate to the requirements of a specific application.

The Payload element 425 includes an Asset element 426, Layers L[0] through L[ . . . ] 427, and Frame Rate Per Seconds “FPS” elements FPS[0] through FPS[ . . . ] 428. The Asset element 426 includes the UUID identifying the video file encoded with temporal scalability. As described above, the encoded video can be separated into several temporal layers, with each layer having frames of video that can be merged with a base layer to achieve a particular enhanced frame rate. Each separated layer has the same UUID, which is used to verify and track the different layers. Layers L[0] through L[ . . . ] provide a numerical value (i.e., 0 or 1) that can be used to determine whether the particular layer is available. The FPS[0] through FPS[ . . . ] provide the frame rate (i.e., frames per second) of each corresponding layer. In some embodiments, the frame rate of each layer is fixed and can be an integer multiple of the base layer. Although FIG. 4B illustrates an example of a Profile Message element that can be used to provide information regarding the temporal scalability of an encoded video, any of a variety of information can be included in the container file that enables playback devices to detect and playback video at different frame rates as appropriate to the requirements of specific applications.

As described, the encoded video can be inserted within individual Cluster elements of the MKV container. A standard (i.e., none enhanced) Clusters element of a Matroska container file containing encoded video in accordance with an embodiment of the invention is illustrated in FIG. 5A. Each Cluster element 5A00 includes a Timecode element 5A05 indicating the start time of the encoded video within the Cluster element and a plurality of BlockGroup elements 5A10. As noted above, the encoded video stored within the Cluster is constrained so that the encoded video can be played back without reference to the encoded video contained within any of the other Cluster elements in the container file. In many embodiments, encoding the video contained within the Cluster element as a GOP in which the first frame is an IDR frame (i.e., key-frame) enforces the constraint. In the illustrated embodiment, the first BlockGroup element contains an IDR frame. Therefore, the BlockGroup element does not include a ReferenceBlock element. The BlockGroup element 5A10 includes a Block element 5A11, which specifies the Timecode attribute of the video frame encoded within the Block element relative to the Timecode of the Cluster element 5A00. In the illustrated embodiment, subsequent BlockGroup elements are not restricted in the types of video frames that they can contain (other than that they cannot reference frames that are not contained within the Cluster element). Therefore, subsequent BlockGroup elements can include ReferenceBlock elements referencing other BlockGroup element(s) utilized in the decoding of the video frame contained within the Block element of the BlockGroup. Alternatively, subsequent BlockGroup elements can contain IDR frames and are similar to the first BlockGroup element. As discussed below, when an enhancement layer is contained within a container file separate from the base layer, the frames in the BlockGroup elements may be restricted to only reference frames of video from the base layer.

FIG. 5B illustrates a modified (non-standard) Cluster element 5600 for use in the playback of encoded video with temporal scalability. In particular, each Block element 5611 includes an Access Unit Delimiter 5612 (“AUD”) that is used to indicate the boundaries between Blocks (i.e., Access Units or frames of video) of a video file. The AUD also contains a Temporal I.D. element 5613 that identifies the temporal layer of a particular Block (i.e., the layer to store a particular video frame). In many embodiments, the encoder can be configured to insert an AUD and Temporal I.D. for every Block in an encoded video. In some embodiments, the AUD is only present when there is more than one temporal layer in an encoded video. In many embodiments, a decoder is able to obtain the Temporal I.D. associated with a particular Block by only parsing the first few bytes of each Block. As illustrated in FIG. 5B, Block 5611 has a Temporal I.D. of 0, which indicates that the video data contained within this Block is for a frame that is stored within the base layer of the encoded video. Likewise, Block 5614 has a Temporal I.D. of 1, which indicates that the video data contained within this Block is for a frame of video that is stored within one of the enhancement layers.

In the example illustrated in FIG. 5B, the different temporal layers of the encoded video are contained within a single MKV container file. However, in many other embodiments, each separate temporal layer of the encoded video can be stored in a separate MKV container file. This can be particularly useful in a streaming context where only certain temporal layers may be needed by different playback devices with different playback profiles.

An example of separate container files storing different temporal layers is illustrated in FIG. 6. In particular, FIG. 6 illustrates two container files 601 and 602, with each container file storing a particular temporal layer of an encoded video. The example illustrated in this figure illustrates the Cluster element of the Matroska container file, which, as described above, is used to store a particular duration (e.g., 2 seconds) of encoded video. Furthermore, each Cluster includes numerous BlockGroups 603, each containing a Block element 604 and (optionally) associated an Reference Block(s) 607, with each Block corresponding to a particular video frame displayed within the particular duration of encoded video. Furthermore, each Block element of the container file containing the enhancement layer 602 includes an AUD 605 containing the Temporal ID 606 of the particular Block element 604, which may or may not contain video data for an access unit depending upon whether the Temporal ID indicates that the Block is part of the enhancement layer. The Temporal ID identifies the particular temporal layer corresponding to the Block.

In order to separate the temporal layers into separate streams, many embodiments can store within a particular container file only those video frames that have a Temporal ID identifying the particular temporal layer. As illustrated in this example, Cluster 601 includes Blocks and Reference Blocks which all have a Temporal ID of 0, which indicates that the encoded video frame within these Blocks correspond to the base temporal layer. In the illustrated embodiment, these Blocks do not include AUDs. In other embodiments, the Blocks in the container file containing the base layer can include AUDs. Likewise, Cluster 602 includes Blocks (and ReferenceBlocks) which all have a Temporal ID of 1, which indicates that the encoded video frames within these Blocks belong to an enhancement layer with and ID of 1. As noted above, the container file containing the clusters that include the enhancement layer(s) can also include Blocks containing AUDs indicating the decode order of the merged layers (see discussion below). In many embodiments, storing the temporal layers in separate containers allows for the individual streaming of particular temporal layers, as requested by different devices with different playback capabilities. Although the above describes inserting information concerning the various temporal layers, and metadata identifying the frames belonging to the enhancement layers, similar techniques can be utilized to stored encoded video incorporating enhancement layers in any of a variety of different container files in accordance with embodiments of the invention.

Generating a Container File for Video Encoded with Temporal Layers

In order to facilitate the playback of encoded video with temporal scalability, metadata describing the temporal layers of the encoded video may be embedded that facilitates the playback of the encoded video at different frame rates. The metadata may be embedded in either the container file or within the encoded video data. In many embodiments, the video is encoded in accordance with the HEVC standard and an encoder can embed certain additional information during the encoding process that facilitates the video playback. A process for embedding information describing video encoded with temporal scalability in a container file in accordance with an embodiment of the invention is illustrated in FIG. 7.

The process 700 commences by initializing (705) source video for encoding with temporal scalability. The resulting encoded video may contain multiple video layers, including a base layer containing frames of video for playback at a base frame rate and one or more enhancement layers containing frames of video for playback at a higher enhanced frame rate. In some embodiments, the same process will be utilized for encoding a video without temporal scalability (i.e., no multiple temporal layers). In this situation, the process may provide an indication that the enhancement layers are unavailable.

The process inserts (710) metadata into the container file indicating the presence of one or more enhancement layers within the file and the frame rate of the enhancement layer. In the case of a Matroska container file, a Profile Message can be inserted into the file header that includes information regarding the temporal layers and the corresponding frame rate of each layer. In many embodiments, the Profile Message is the DivX HEVC Profile Message specified by DivX, LLC of San Diego, Calif. In other embodiments, any of a variety of metadata describing an enhancement layer can be stored in a container file as appropriate to the requirements of a specific application.

The process 700 encodes (715) the video with temporal scalability. As described above, in many embodiments the process utilizes the HEVC compression standard for encoding the video. During the encoding process, the process may store portions of the encoded video within Matroska container files. As described above, in some embodiments, the process may also embed an Access Unit Delimiter (AUD) within each frame of video that provides the corresponding temporal layer associated with the video frame. In some embodiments, the AUD is contained within the Block (or Reference Block) element of the MKV container, with each Block containing the encoded video frame data for a particular video frame. In other embodiments, the process may not embed the AUD into the Block, but can use a different mechanism in order to provide an indication of the temporal layer associated with a particular frame of video. For example, in many embodiments that store the temporal layers in different containers, the process may provide null values to indicate that Blocks in different containers corresponding to different temporal layers will contain the video data for certain frames.

The process 700 determines (720) whether to store the encoded video as one or more files, such as a single MKV file. The file may then be stored on a non-volatile storage medium such as a CD-ROM, flash-drive, or other storage medium. The file may also be stored and distributed to a user by allowing the user to download the file from a distribution server. If the process determines that the encoded video is to be stored as a file, the process can store (725) the file containing the encoded video on a storage medium (i.e., Distribution Server or CD-ROM, flash-drive, or other non-volatile storage etc.). In many embodiments, the encoded video is stored as a single file with multiple temporal layers of video that can be decoded by a decoder implemented on the playback device. In several other embodiments, each temporal layer of the encoded video is stored as a separate file in order to allow a playback device to obtain only the encoded video that the device is capable of playing back.

The process 700 determines (730) whether to store the encoded video in a manner suitable for streaming to playback devices. When the process determines (730) not to store streams of the encoded video, the process is complete.

When the process 700 determines (730) that the encoded video should be stored for streaming, the process generates and stores (735) separate streams of frames of video, with each stream corresponding to a temporal layer of the encoded video. In many embodiments, in order to generate the separate streams, the process analyzes a Temporal I.D. associated with each frame of video in the single video stream. In several embodiments, the video stream will include many different video frames with the frames ordered based on the decoding order.

In a number of embodiments, the Temporal I.D. may be stored within the AUD of a Block element within a Matroska container. Based on the Temporal I.D. of the frames of video, the process may separate out different frames of video to different streams. Thus each separate stream may contain only the video data for frames of video within the particular stream. For example, the base layer may contain only the video data for frames that are to be played back at the base frame rate. Thus, if a video has a base frame rate of 30 f.p.s, the base layer will contain 30 frames for one second of encoded video. Continuing with the example, the one or more enhancement layers can contain the video data for the frames that are to be played back at the higher enhanced frame rate. Thus, if a video is to be played back at an enhanced frame rate of 60 f.p.s. and has a base frame rate of 30 f.p.s., the enhancement layer of this encoded video will contain 30 additional video frames that can be combined with the 30 frames in the base layer to generate an output of 60 f.p.s. As described below, the combined frames may be provided to the decoder in a particular decode order, which is an order that causes the decoder to have fully decoded all frames on which a given frame depends prior to decoding the given frame. In order to know how the frames are to be merged, the process also retains (735) the AUD order of frames within at least one of the layers. In many embodiments, metadata describing the ordering of frames is stored in at least one of the enhancement layers. For example, prior to separating the frames to the different streams, the process can retain the order of the layers of the frames within the single stream. During the merging of the frames, the process can then identify the corresponding layer that contains the frame that should be retrieved for the encoded video. After generating and storing the separate streams, the process is complete. Although specific processes for embedding information describing video encoded with temporal scalability are described above, any of a variety of processes may be utilized for embedding information describing video encoded with temporal scalability as appropriate to the requirements of specific applications in accordance with embodiments of the invention.

Playback of Encoded Video at Different Frame Rates

Playback of encoded video with temporal scalability can allow the encoded video to be played back at different frame rates. A process for playing back an encoded video including temporal layers in accordance with an embodiment of the invention is illustrated in FIG. 8. The process 800 commences by obtaining (805) a file header for the encoded video that is to be played back on the playback device. As described above, in many embodiments the encoded video is stored in one or more Matroska container files, and the header of the Matroska container file may contain information regarding the encoded video contained within the particular container. The information stored within a Matroska container may be organized within different elements to facilitate the easy retrieval of the information when needed for playback of the encoded video. In particular, the process can access different elements to obtain different types of information that may be needed for playback. In other embodiments, any of a variety of container file formats appropriate to the requirements of a specific application can be utilized.

Metadata is obtained (810) from the header, which describes the various tracks within the encoded video. The metadata can be parsed (815) to retrieve information regarding the particular codec (i.e., compression/decompression standard) that was used to encode the video. In embodiments where the encoded video data is contained within a Matroska container file, the metadata is contained within a Codec Private element contained within a Tracks element. In many embodiments, the codec may be a codec provided by DivX, LLC of San Diego, Calif.

The metadata within the header of the container file may contain metadata that describes the temporal layers of the encoded video. If the process does not detect (820) metadata that describes temporal layers of the encoded video, the process plays back (835) the encoded video using a standard normal playback process. This would occur for a video that has been encoded without temporal scalability (i.e., there is only a single base layer of video frames). In many embodiments, the standard playback process decodes the video frames within a single track of video data contained in the container file.

If the process detects (820) metadata that describes the temporal layers of the encoded video, the metadata can be parsed (825) in order to obtain information that can be used to facilitate the playback of the encoded video at an enhanced frame rate. The obtained information can indicate whether or not the video is encoded with temporal scalability (i.e., there are multiple layers of video data). In particular, the metadata can describe the layers that are available in the encoded video and the particular frame rate of each layer. In a streaming environment, the metadata may also describe other temporal scalability streams contained within different container files. In embodiments where the encoded video data is contained within a Matroska container file, the metadata that describes the temporal layers of the encoded video can be contained within a Profile Message element within a Codec Private element. In other embodiments, metadata describing the temporal layers of the encoded video can be inserted in any of a variety of locations and/or data formats within a container file and/or other file type including (but not limited to) top level index files and/or metadata files as appropriate to the requirements of specific applications.

When the process (830) does not detect temporal scalability (i.e., the process does not detect the existence of multiple layers in the encoded video), the process plays (835) the encoded video using standard playback. When the process detects (830) temporal scalability (i.e., multiple available temporal layers), the process can play back (840) the encoded video with temporal scalability. In particular, the process plays back the encoded video either the full frame rate (e.g., 60 fps) or only at the base frame rate (e.g., 30 fps). Furthermore, for a file-based playback, the device on which the process will play back the encoded video can quickly determine which frames can be decoded by the device based on the temporal I.D. of each frame. Likewise, as described in detail below, during a streaming playback session involving separate streams for different temporal layers, the process can merge the separate streams corresponding to the different temporal layers into a single stream of encoded video prior to providing the stream to a decoding process. Various mechanisms for separating and merging streams of video data to achieve temporal scalability in accordance with embodiments of the invention are described in detail further below.

Playback of Encoded Video with Separate Streams

As described above, in many embodiments the video is encoded with one or more temporal layers, with each layer stored in a separate stream. In a distribution channel that streams the encoded video to playback devices, the separate streams allow different playback devices the ability to request only those streams that the particular playback device is capable of decoding and playing back. An example of a process for streaming encoded video utilizing separate streams in accordance with an embodiment of the invention is illustrated in FIG. 9. In this example, several of the steps in the process are similar to the steps described for both the file-based and stream-based distribution that were described in FIG. 8, and thus many of the details described in FIG. 8 are not provided in this example.

The process 900 initially detects (905) the presence of metadata within a header of the container file containing information about the temporal scalability of the encoded video. In embodiments that utilize a Matroska container file, the metadata can take the form of a Profile Message element similar to the various Profile Messages described above with respect to FIG. 4B. The metadata is parsed (910) to obtain information about the temporal scalability of the encoded video, including the number of available temporal layers and the frame rate of each layer.

Based on the playback capabilities of the device (i.e., the device's video profile), the process requests (915) streams for one or more of the temporal layers from a distribution server. In some embodiments, when the process requests only the base layer of the encoded video for playback at the base frame rate, the distribution server streams only the base layer. When the process requests the base layer and or more enhancement layers, the distribution server also streams each different temporal layer of the encoded video.

Based on whether the process has requested (i) only the base layer or (ii) the base layer and one or more enhancement layers, the process may need to merge 920 (optional) the streams of temporal layers into a single stream of frames in decode order (as opposed to playback order). In several embodiments, at least one of the layers includes metadata indicating the decode order of the frames in the base layer and the one or more enhancement layers. In embodiments in which the video is encoded in accordance with the HEVC standard, the metadata indicating decode order is a sequence of AUDs that indicate the temporal layer from which to retrieve encoded video data. The separate streams can then be merged 720 based on the AUD order contained within the one (or more) layers described above. In certain embodiments, the sequence of AUDs is contained in at least one of the enhancement layers. In other embodiments, decode order can be indicated in any of a variety of ways appropriate to the requirements of specific applications including (but not limited) by specifying the decode order of access units within metadata accompanying the access units in the container file and/or inserting null or empty access units in the container file of one of the layers.

When the process only requests a single temporal layer, the process can skip the optional merge (920) and playback (925) the encoded video. Furthermore, in many embodiments, the distribution server can merge the separate streams into a single stream prior to distributing the encoded video to a playback device. In this situation, the process may also playback (925) the encoded video without executing the optional merge (920) in the process. After playback, the process is complete. The process of merging the separate streams containing the different temporal layers may be performed by either (i) the playback device after it receives the separate streams from the distribution server or (ii) the distribution server prior to sending a single stream containing the multiple temporal layers to the playback device. Although specific processes for playback of an encoded video containing separate streams are described above, any of a variety of processes may be utilized for playback of an encoded video containing separate streams as appropriate to the requirements of specific application in accordance with embodiments of the invention. An example of a process of many embodiments for merging separate streams is described below.

Combining Separate Streams Based on AUD Order

As described above, in a streaming context, each temporal layer of the encoded video may be stored as a separate stream and different streams may be provided to different playback devices to reduce wasteful network consumption. An example of a process for merging separate streams of an encoded video in accordance with an embodiment of the invention is illustrated in FIG. 10.

The process 1000 requests (1005) streaming of a particular set of temporal layers from a distribution server. In some embodiments, the process requests the set of streams based on the playback capabilities of the playback device. In particular, when a playback device does not have the playback capability to handle the enhancement layer(s), the process requests (1005) only the encoded video within the base layer, receives (1015) a stream containing video data from only the base layer of the encoded video, and plays back (1035) the encoded video.

When (1010) the playback device has the ability to decode and playback one or more of the enhancement layers, the process requests both the base layer and enhancement layer(s). The process then receives (1020) separate streams containing the base layer and the one or more enhancement layers. The process then may need to combine the separate streams into a single stream prior to providing the stream to the decoder on the playback device. In order to combine the streams, the process identifies (1025) an AUD order for the video frames (i.e., Access Units), and determines the temporal layer associated with each frame of video. In many embodiments, the AUD order may be obtained from at least one of the layers. The AUD order identifies the order of video frames and the particular temporal layer that contains the video frame. In particular, each frame (e.g., Matroska Block described above) can be embedded with an AUD containing a Temporal I.D. that identifies a particular layer for the frame. The order that these frames are separated into separate streams may be retained within one of the temporal layers. For example, an AUD order may simply be a series of 1's and 0's, such as “001101 . . . ”, which would indicate that the order of frames (prior to being separated into separate streams) is: “base layer, base layer, enhancement layer, enhancement layer, base layer, enhancement layer, . . . ” etc.

Thus each separate layer can be recombined by selecting frames from the different temporal layers based on the AUD. In particular, an AUD with Temporal I.D. of 0 means that the process needs to merge the next frame of the base layer stream and an AUD with Temporal ID of 1 means that the process needs to merge the next frame of the particular enhancement layer stream with Temporal ID of 1. By retaining the original Temporal ID order of the video frames, the process is able to easily re-combine (1030) the base layer video data with the enhancement layer video data into a single stream of encoded video.

Having combined the separate streams, the process plays back (1035) the encoded video. After playback, the process is complete. Although specific processes for merging separate streams of an encoded video are described above, any of a variety of processes may be utilized for merging separate streams of an encoded video as appropriate to the requirements of specific application in accordance with embodiments of the invention. Several additional examples are provided below that illustrate the merging of separate streams of an encoded video.

Decoding Order of Frames

As described above, in order for a decoder to decode a given video frame, in some embodiments, the decoder of a playback device needs to have fully decoded all frames on which the given frame depends prior to decoding the given frame. FIGS. 11A and 11B illustrate an example of the decoding a set of video frames ordered in a decode order. In particular, FIG. 11A illustrates the reference dependencies that may exist between a set of video frames ordered based on the picture display order (POC) of the video frames. The POC of a frame provides the position of a given frame relative to the display order of the other frames in the same portion of encoded video, such as a Matroska Cluster element that encodes a 2-second duration of encoded video.

As illustrated, the arrows between the various frames 1110 indicate the other frames on which the particular frame is dependent. As illustrated, POC 0 does not have any outward arrows, since this is an I-frame and thus is not dependent on any other frames for its decoding. The next POC 1 is dependent on frames POC 0 and POC 2. Thus, in order for a decoder of a playback device of some embodiments to be able to decode POC 1 video frame, the decoder should have already decoded POC 0 and POC 2. Likewise, POC 2 is dependent on POC 0 and POC 4; POC 3 is dependent on POC 2 and POC 0; POC 4 is dependent on POC0 and POC 8; and these dependencies continue for each B or P frame in the particular portion of encoded video. Thus in order to decode these video frames within the particular portion of the encoded video, the frames are provided to the decoder in an order that guarantees that for a given frame, the decoder has already decoded all frames on which the given frame depends prior to decoding the given frame. Thus the decode order for these frames is not the same as the POC order (i.e., 0, 1, 2, 3, etc.) of the frames.

FIG. 11B illustrates a table providing the required decode order for the frames illustrated in FIG. 11A. In particular, the decode order for the frames is as follows: POC 0, POC 8, POC 4, POC 2, POC 1, POC 3, POC 6, POC 5, and POC 7. Furthermore, the table also provides the Temporal ID, indicated as “Tid” for each frame. As described above, in many embodiments the Temporal ID is embedded within each frame of the encoded video. For example, the Temporal ID may be embedded within the Block element (i.e., frame) of the MKV container. In this example, the AUD temporal ID order of the set of frames is: 0, 0, 0, 0, 1, 1, 0, 1, 1. Thus during merging of the separate streams, this AUD temporal ID order may be used to determine the order in which the frames from the different streams need to be combined for the decode order.

Furthermore, the Temporal ID associated with each frame of an encoded video can be used to quickly separate the temporal layers into different streams. An example of separating an encoded video into separate streams in accordance with an embodiment of the invention is illustrated in FIGS. 12A-12B.

FIG. 12A illustrates an example of a portion of an encoded video stream containing several frames of video (0 through 8). The frames are ordered based on the decode order of the video. In particular, the decode order for this portion of the video is POC 0, 8, 4, 2, 1, 3, 6, 5 and 7. Each POC also includes an AUD (i.e., Access Unit Delimiter) that contains a Temporal ID identifying the temporal layer for the frame of video. For example, POC 0 has a TID of 0, POC 8 has a TID of 0, and this continues along the stream of encoded video. As noted above, the Temporal ID can be used to separate the frames into separate streams.

FIG. 12B illustrates an example of the separate streams that may be generated for the encoded video illustrated example illustrated FIG. 12A. In particular, the stream 0, 8, 4, 2, 1, 3, 6, 5, and 7 needs to be separated into a stream containing only frames for the base layer (i.e., Temporal ID of 0) and a stream containing only frames for the enhancement layer (i.e., Temporal ID of 1). As illustrated, the first frame (POC 0, TID 0) is separated to the base layer because it has a TID of 0, the second frame (POC 8, TID 0) is separated to the base layer (which now contains the frames 0, 8), the third frame (POC 4, TID 0) is again separated to the base layer (which now contains the frames 0, 8, 4), the fourth frame (POC 2, TID 0) is again separated to the base layer (which now contains the frames 0, 8, 4, 2), now at the fifth frame (POC 1, TID 1) this frame is separate to the enhancement layer because it has a TID of 1. At this point, the base layer 12610 has frames POC: 0, 8, 4, 2 and the enhancement layer 12620 has frame POC: 1. This process continues on through the frames of encoded video. For this portion of frames, the stream 12610 corresponding to the base layer with Temporal ID of 0 contains the frames: 0, 8, 4, 2, and 6. Likewise, stream 12620 corresponding to the enhancement layer with Temporal ID of 1 contains the frames 1, 3, 5, and 7. Having separated the frames for the different temporal layers into separate streams, these streams 12610 and 12620 can now be individually streamed to different devices, as requested by the devices. Furthermore, as described above, information regarding the AUD Temporal ID order of the frames can also be streamed, for example within one of the temporal layers or as a separate metadata, for use during the merging of the separate streams prior to playback on the device.

An example of merging of different temporal streams in accordance with an embodiment of the invention is illustrated in FIG. 13. In particular, FIG. 13 illustrates a stream 1305 corresponding to the base temporal layer and a stream 1310 corresponding to the enhancement layer. These streams correspond to the streams that were separated in FIGS. 12A-12B. In particular, stream 1305 includes the video frames (illustrated as POC Video Data) for POCs: 0, 8, 4, 2, and 6. Likewise, stream 1310 includes the video frames for POCs 1, 3, 5 and 7. Accordingly, in this example, each stream 1305 and 1310 has the video data for video frames associated with its particular temporal layer. Furthermore, in this particular example, stream 1310 also includes the AUD Temporal ID order, which can be used to merge the separate streams into a single stream.

In particular, the AUD Temporal ID order in this example is: 0, 0, 0, 0, 1, 1, 0, 1, 1. As such, this AUD Temporal ID order indicates that the first AUD has a Temporal ID of 0, and thus the combined video stream needs to retrieve and merge the video data of the 1^(st) frame (i.e., POC 0) from the base layer stream 1305. The next AUD Temporal ID is again 0, and thus again, the combined stream is able to retrieve and merge the video data of the next frame from the base layer (i.e., POC 8). This continues through the entire AUD Temporal ID series, and thus the stream is combined as a combined stream using the following order of POCs: 0, 8, 4, 2, 6, 1, 3, 6, 5 and 7. Note that the POC order is now back to the same order that it was prior to the separation of the layers into the separate streams illustrated in FIGS. 12A-12B.

The combined stream can now be provided to a decoder of the playback device for decoding of the video frames. Although the example in FIG. 13 illustrates combining different streams containing different temporal layers using an AUD Temporal ID order of the video frames, any of a variety of mechanisms may be utilized for merging separate streams of encoded video as appropriate to the requirements of specific applications in accordance with embodiments of the invention.

Furthermore, providing separate streams for the different temporal layers allows the system to stream the individual layers that are needed for a particular device. As described above, the different streams may be requested by a playback device using HTTP, which is a stateless protocol that enables a playback device to request a byte range within a file, or RTSP which is a network control protocol used to control streaming media servers whereby playback devices issue control commands, such as “play” and “pause”, to the server streaming the media to control the playback of media files. When RTSP is utilized, the media server records the state of each client device and determines the media to stream based upon the instructions received from the client devices and the client's state. Examples of such streaming media servers are described below.

Streaming Server

Playback devices may request different temporal layers of an encoded video with temporal scalability based on the particular playback capacities of the device. A process for streaming different temporal layers of an encoded video for playback on a playback device in accordance with an embodiment of the invention is illustrated in FIG. 14.

The process 1400 receives a request (1405) for streaming of an encoded video. In some embodiments, the request may be received from a playback device and include a particular video profile of the device. For example, the video profile may provide the frame rate at which the device is able to playback an encoded video.

The process determines (1410) whether to stream the video at a base frame rate. For example, if the playback device is only capable of decoding the base layer of the encoded video, the process streams only the base layer. In an adaptive bitrate context, the process may decide to stream at the base rate based on the given streaming conditions of the network such as the bandwidth available or the CPU capacity of the device for processing the video frames.

When the process determines (1410) to stream the encoded video at the base frame rate, the process streams (1420) only the stream containing the base layer of video frames. In some embodiments, the process maintains the state of the streaming being provided to the playback device. For example, the process may use RTSP to establish and control the video streams to the playback device. Likewise, the playback device can issue commands, such as play, pause, and stop, to enable the real-time control of playback of the streaming video. In other embodiments, the process is a stateless process such as HTTP.

When the process determines (1410) not to stream the video at the base frame rate, the process determines (1415) whether to stream the video at a higher enhanced frame rate. For example, if the profile of the playback device indicates that the device is able to playback video at the enhanced frame rate, the process streams (1425) both the stream for the base layer and the one or more streams for the enhancement layer. As described above, in several embodiments, the process may merge the separate streams and stream a single stream to the playback device while in other embodiments, the process may stream the streams as separate streams. In some embodiments, the playback device can merge the separate streams into the proper decode order for decoding by a decoder implemented on the playback device. After merging, the process is complete. If the process determines (1415) not to stream the video at the enhanced frame rate, the process is complete.

A specific process for streaming different temporal layers of an encoded video for playback on a playback device is described above, however, any variety of processes may be utilized for streaming different temporal layers of an encoded video for playback on a playback device in accordance with embodiments of the invention.

Although the present invention has been described in certain specific aspects, many additional modifications and variations would be apparent to those skilled in the art. It is therefore to be understood that the present invention may be practiced otherwise than specifically described. Thus, embodiments of the present invention should be considered in all respects as illustrative and not restrictive. Accordingly, the scope of the invention should be determined not by the embodiments illustrated, but by the appended claims and their equivalents. 

What is claimed is:
 1. A non-transitory machine readable medium containing processor instructions, where execution of the instructions by a processor causes the processor to perform a process comprising: receive video having a plurality of access units; and encode the video into a set of layers comprising a base layer and at least one enhancement layer, wherein the encoding comprises: (i) using a temporal identifier of each access unit to determine the particular layer associated with the access unit and (ii) retaining an order of the temporal identifiers of the plurality of access units of the video.
 2. The non-transitory machine readable medium of claim 1, wherein the temporal identifier of an access unit is stored in an initial set of bits of the access unit.
 3. The non-transitory machine readable medium of claim 1, further comprising inserting a temporal identifier for a set of access units of the plurality of access units of the video.
 4. The non-transitory machine readable medium of claim 1, further comprising inserting a metadata tag providing information regarding the layers available and the frame rate of each layer.
 5. The non-transitory machine readable medium of claim 1, further comprising: receiving a request for streaming of the video; determining playback capabilities of a device requesting the video; streaming different sets of layers of the video based on the playback capabilities of the device, wherein (i) the base layer is streamed to a playback device capable of playing back the base layer and (ii) the base layer and at least one enhancement layer is streamed to a playback device capable of streaming the plurality of layers.
 6. The non-transitory machine readable medium of claim 5, wherein streaming the different sets of layers comprises merging the different layers using the retained order of the temporal identifiers of the plurality of access units of the video.
 7. The non-transitory machine readable medium of claim 1, further comprising: receiving a request for downloading of the video from a playback device; providing the encoded video to the playback device.
 8. The non-transitory machine readable medium of claim 1, wherein the frame rate of the at least one enhancement layer is an integer multiple of the base layer.
 9. The non-transitory machine readable medium of claim 1, further comprising storing each layer as a separate stream.
 10. The non-transitory machine readable medium of claim 1, further comprising storing each layer in a separate container file.
 11. A source encoder, comprising: a processor configured by a source encoder application to: receive video having a plurality of access units; and encode the video into a set of layers comprising a base layer and at least one enhancement layer, wherein the encoding comprises: (i) using a temporal identifier of each access unit to determine the particular layer associated with the access unit and (ii) retaining an order of the temporal identifiers of the plurality of access units of the video.
 12. The source encoder of claim 11, wherein the temporal identifier of an access unit is stored in a header of the access unit.
 13. The source encoder of claim 11, further comprising inserting a temporal identifier for a set of access units of the plurality of access units of the video.
 14. The source encoder of claim 11, further comprising inserting a metadata tag providing information regarding the layers available and the frame rate of each layer.
 15. A playback device configured to playback video comprising: a processor configured to communicate with a memory, where the memory contains a client application; wherein the client application configures the processor to: receive video comprising a plurality of access units; playback the video, wherein the playback device plays back the video (i) using a base layer when the playback device has a first set of playback capabilities and (ii) using the base layer and at least one enhancement layer when the playback device has a second set of playback capabilities.
 16. The playback device of claim 15, wherein the client application further configures the processor to: identify an order of temporal identifiers of the plurality of access units of the video; and merge the access units of the base layer and the access units of at least one enhancement layer using the order of temporal identifies of the plurality of access units of the video.
 17. The playback device of claim 15, wherein the client application further configures the processor to: request streaming of the video to a playback server and provide information regarding playback capabilities of the playback device to the playback server; receive a first stream comprising the base layer of the video and a second stream comprising the at least one enhancement layer of the video.
 18. The playback device of claim 15, wherein the client application further configures the processor to: request downloading of the video to a content distribution server and provide playback capabilities of the playback device to the content distribution server; receive the video from the content distribution server, wherein a first device receives video comprising the base layer when the first device is capable of playing back the video at a first frame rate and a second device receives video comprising the base layer and at least one enhancement layer when the second device is capable of playing back the video at a second frame rate.
 19. The playback device of claim 15, wherein the client application further configures the processor to: retrieve a metadata tag from the video identifying the layers available and the frame rate of each layer; determining a set of layers to playback based on the information in the metadata tag.
 20. The playback device of claim 15, wherein the client application further configures the processor to: identify the temporal identifier of an access unit by parsing an initial set of bytes of the access unit. 